package com.cuixichang.minimalism.service;

import com.cuixichang.minimalism.transfer.dto.ILoginRoleDTO;
import com.cuixichang.minimalism.transfer.po.ILoginRole;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Function;
/**
 * 账户与角色关系表服务接口
 *
 * @author cuixichang
 * @date 2024-12-18
 */
public interface ILoginRoleService{

    ILoginRoleDTO selectById(Long id);

    ILoginRoleDTO selectOne(ILoginRoleDTO iLoginRoleDTO);

    List<ILoginRoleDTO> selectByIds(List<Long> ids);

    List<ILoginRoleDTO> selectList(ILoginRoleDTO iLoginRoleDTO);

    List<ILoginRoleDTO> selectList(ILoginRoleDTO iLoginRoleDTO, BiConsumer<ILoginRole, QueryWrapper<ILoginRole>> consumer);

    Page<ILoginRoleDTO> selectPage(ILoginRoleDTO iLoginRoleDTO, long pageSize, long pageNo);

    Page<ILoginRoleDTO> selectPage(ILoginRoleDTO iLoginRoleDTO, long pageSize, long pageNo, BiConsumer<ILoginRole, QueryWrapper<ILoginRole>> consumer);

    int deleteById(Long id);

    int deleteByIds(List<Long> ids);

    int deleteByCondition(ILoginRoleDTO iLoginRoleDTO);

    int deleteByCondition(ILoginRoleDTO iLoginRoleDTO, BiConsumer<ILoginRole, QueryWrapper<ILoginRole>> consumer);

    ILoginRoleDTO insert(ILoginRoleDTO iLoginRoleDTO);

    ILoginRoleDTO insertHasOption(ILoginRoleDTO iLoginRoleDTO, Function<ILoginRoleDTO,ILoginRoleDTO> preOption);

    int updateById(ILoginRoleDTO iLoginRoleDTO);

    int updateById(ILoginRoleDTO iLoginRoleDTO, BiConsumer<ILoginRole, UpdateWrapper<ILoginRole>> consumer);
}